package com.kd.controller.admin;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageInfo;
import com.kd.bean.admin.AdminBasic;
import com.kd.bean.jobSeeker.Basic_information;
import com.kd.service.admin.IAdminBasicService;

@Controller
@RequestMapping("/adminBasic")
public class AdminBasicController {
	
	@Autowired
	private IAdminBasicService adminBasicService;
	
	@RequestMapping("/queryBasic_id")
	@ResponseBody
	public PageInfo<AdminBasic> queryBasic_id(Integer pageNum,Integer pageSize,HttpSession session){
		Basic_information basic_information = (Basic_information) session.getAttribute("basicMessage");
		
		PageInfo<AdminBasic> info = null;
		try {
			info = adminBasicService.queryBasic_id(pageNum, pageSize, basic_information.getBasic_id());
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return info;
	}
	
	@RequestMapping("/updateAdminBasicAdminRec_news_status")
	@ResponseBody
	public Boolean updateAdminBasicAdminRec_news_status(Integer adminBasic_news_id,Integer adminRec_news_status) {
		Boolean flag = false;
		try {
			flag = adminBasicService.updateAdminBasicAdminRec_news_status(adminRec_news_status, adminBasic_news_id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return flag;
	}
}
